import request from '@/utils/request';
import type { BaseResponse, UserLoginDTO, UserLoginVO, UserRegisterDTO } from '@/types';

// 登录
export const login = (data: UserLoginDTO) => {
  return request.post<BaseResponse<UserLoginVO>>('/sso/login', data);
};

// 注册
export const register = (data: UserRegisterDTO) => {
  return request.post<BaseResponse<boolean>>('/sso/register', data);
};

// 注销
export const logout = () => {
  return request.post('/sso/logoutByAlone');
};
